/* This file was generated with JastAdd2 (http://jastadd.org) version R20121112 (r872) */
package icode;

import util.*;
import java.util.*;
/**
 * @production Instruction : {@link ASTNode};
 * @ast node
 * @declaredat /h/d1/l/int13mka/workspace/CalcCode/icodespec/icode.ast:2
 */
public abstract class Instruction extends ASTNode<ASTNode> implements Cloneable {
  /**
   * @apilevel low-level
   */
  public void flushCache() {
    super.flushCache();
  }
  /**
   * @apilevel internal
   */
  public void flushCollectionCache() {
    super.flushCollectionCache();
  }
  /**
   * @apilevel internal
   */
  @SuppressWarnings({"unchecked", "cast"})
  public Instruction clone() throws CloneNotSupportedException {
    Instruction node = (Instruction)super.clone();
    return node;
  }
  /**
   * @ast method 
   * @aspect icodeToString
   * @declaredat /h/d1/l/int13mka/workspace/CalcCode/icodespec/icodeToString.jadd:16
   */
  

    String comment = "";
  /**
   * @ast method 
   * @aspect icodeToString
   * @declaredat /h/d1/l/int13mka/workspace/CalcCode/icodespec/icodeToString.jadd:17
   */
  
    static final int commentTab = 5;
  /**
   * @ast method 
   * @aspect icodeToString
   * @declaredat /h/d1/l/int13mka/workspace/CalcCode/icodespec/icodeToString.jadd:18
   */
  public void setComment(String comment) {
        this.comment = comment;
    }
  /**
   * @ast method 
   * @aspect icodeToString
   * @declaredat /h/d1/l/int13mka/workspace/CalcCode/icodespec/icodeToString.jadd:22
   */
  abstract void appendBody(TabbedBuffer buffer);
  /**
   * @ast method 
   * @aspect icodeToString
   * @declaredat /h/d1/l/int13mka/workspace/CalcCode/icodespec/icodeToString.jadd:23
   */
  public String toString(TabbedBuffer buffer) {
        buffer.tabTo(1);
        appendBody(buffer);
        buffer.tabTo(commentTab);
        if (!comment.equals("")) {
          buffer.append("// ");
          buffer.append(comment);
        }
        return buffer.toString();
    }
  /**
   * @ast method 
   * 
   */
  public Instruction() {
    super();


  }
  /**
   * @apilevel low-level
   * @ast method 
   * 
   */
  protected int numChildren() {
    return 0;
  }
}
